<div id="content">
    <?php
    include("./PDO/PdoLieu.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/Lieu.php"); //On inclut les fonctions PDO (create / update etc...)

    $lieu = new PdoLieu();
    $lieu = $lieu->readAll();
    
    include("./PDO/PdoCategorie.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/Categorie.php"); //On inclut les fonctions PDO (create / update etc...)

    $categorie = new PdoCategorie();
    $categorie = $categorie->readAll();
    
    include("./PDO/PdoCombat.php"); //On inclut les fonctions PDO (create / update etc...)
    include("./class/Combat.php"); //On inclut les fonctions PDO (create / update etc...)

    $combat = new Pdocombat();
    $combat = $combat->readAll();
    
    include("./PDO/PdoCombattant.php"); 
    include("./class/Combattant.php");
    
    $combattant = new PdoCombattant();
    $combattant = $combattant->readAll();
    ?>
    <form id="validate_form" action="index.php?route=reunion&action=traitement_ajout" method="post">


        <label>Nom</label>
        <input name="NOMREUNION" id="NomReunion" class="validate[required]"/><span id="mess_exist"></span>
        <br/>
        <label>Date</label>

        <input name="DATEREUNION" id="DateReunion" class="validate[required]"/><span id="mess_exist"></span>
        <label>Lieu</label>
        <select name="IDLIEU" size="1">
            <?php
            foreach ($lieu as $unlieu) {
                echo '<option value="' . $unlieu["IDLIEU"] . '">' . $unlieu["NOMLIEU"] . " " . $unlieu["CODEPOSTALIEU"] . '</option>';
            }
            ?>
        </select>  <br/>
        <form id="validate_form" action="index.php?route=reunion&action=traitement_ajout" method="post">

        <br>
        
        <label>Categorie</label>
        <select name="IDCATEGORIE" size="1">
            <?php
            foreach ($categorie as $unecategorie) {
                echo '<option value="' . $unecategorie["IDCATEGORIE"] . '">' . $unecategorie["NOMCATEGORIE"] . '</option>';
            }
            ?>
        </select>  <br/>
        
       
      
        <label>Combattant1</label>
        <select name="IDCOMBATTANT" size="1">
            <?php
            foreach ($combattant as $uncombattant) {
                echo '<option value="' . $uncombattant["IDCOMBATTANT"] . '">' . $uncombattant["NOMCOMBATTANT"] . '</option>';
            }
            ?>
        </select>  <br/>
        
        
        
        <label>Combattant2</label>
        <select name="IDCOMBATTANT" >
            <?php
            foreach ($combattant as $uncombattant) {
                echo '<option value="' . $uncombattant["IDCOMBATTANT"] . '">' . $uncombattant["NOMCOMBATTANT"] . '</option>';
            }
            ?>
        </select>
        
        <form id="validate_form" action="index.php?route=combattant&action=traitement_ajout" method="post">
            
        <br><br>  
        <a href="index.php?route=reunion&action=ajoutercombat"><img src="./images/ajouter.png"/></a><br>
        
        <input type="submit" id="valider" />
    </form>
</div>
